package com.chengshuang.log.controller;

import com.chengshuang.log.annotation.LogRecord;
import com.chengshuang.log.domain.ProjectTask;
import com.chengshuang.log.enums.OperationLogTypeEnum;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("task")
public class ProjectTaskController {

    @LogRecord(
        type = OperationLogTypeEnum.TASK_UPDATE,
        relationId = "{#project.taskId}",
        description = "{task_update{#project}}",
        snapshot = "{task_snapshot{#project.taskId}}")
    @GetMapping("/update")
    public String update(ProjectTask project) {
        return "成功";
    }
}
